| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkGraphics::ConstantBuffer Class Reference

Describes a constant buffer. More...

Inheritance diagram for nkGraphics::ConstantBuffer:

## Public Member Functions
ShaderPassMemorySlot * | getPassMemorySlot (unsigned int index)
ShaderPassMemorySlot * | getPassMemorySlotReadOnly (unsigned int index) const
ShaderPassMemorySlot * | addPassMemorySlot ()
void | changePassMemorySlotOrder (unsigned int fromIndex, unsigned int toIndex)
void | deletePassMemorySlot (unsigned int index)
virtual void | exportClassToTree (nkExport::Node *rootNode) override
virtual void | importClassFromTree (nkExport::Node *rootNode) override
ConstantBuffer & | operator= (const ConstantBuffer &)=delete
Public Member Functions inherited from nkExport::Exportable
| Exportable () noexcept
virtual | ~Exportable ()

## Detailed Description

Describes a constant buffer.

## Member Function Documentation

## ◆ getPassMemorySlot()

ShaderPassMemorySlot* nkGraphics::ConstantBuffer::getPassMemorySlot | ( | unsigned int | index | ) |

Parameters

  index | The index of the slot to retrieve.

Returns
  The slot requested if available, nullptr else.

## ◆ getPassMemorySlotReadOnly()

ShaderPassMemorySlot* nkGraphics::ConstantBuffer::getPassMemorySlotReadOnly | ( | unsigned int | index | ) | const

The read only version of the getter. Use this version when possible, as this avoid a dirtification of the tracking data.

Parameters

  index | The index of the slot to retrieve.

Returns
  The slot requested if available, nullptr else.

## ◆ addPassMemorySlot()

ShaderPassMemorySlot* nkGraphics::ConstantBuffer::addPassMemorySlot | ( |  | ) |

Adds a pass memory slot. Memory slots are fed sequentially, in the order they are declared. Be sure to align all structures within shaders to be coherent with the way the data is fed.

Returns
  A freshly allocated memory slot. The buffer is responsible for the memory returned, external code should not delete it. See deletePassMemorySlot().

## ◆ changePassMemorySlotOrder()

void nkGraphics::ConstantBuffer::changePassMemorySlotOrder | ( | unsigned int | fromIndex,
|  | unsigned int | toIndex
| ) |  |

Changes the ordering in the slots, impacting the way they are fed to the buffer.

Parameters

  fromIndex | The index of the slot to change.
  toIndex | The index to which the slot should be moved.

## ◆ deletePassMemorySlot()

void nkGraphics::ConstantBuffer::deletePassMemorySlot | ( | unsigned int | index | ) |

Erases and frees a slot.

Parameters

  index | The index of the slot to erase.

## ◆ exportClassToTree()

virtual void nkGraphics::ConstantBuffer::exportClassToTree | ( | nkExport::Node * | rootNode | ) |
| override virtual

Basic exporting capabilities.

Parameters

  rootNode | The tree to export to.

Implements nkExport::Exportable.

## ◆ importClassFromTree()

virtual void nkGraphics::ConstantBuffer::importClassFromTree | ( | nkExport::Node * | rootNode | ) |
| override virtual

Basic importing capabilities.

Parameters

  rootNode | The tree to import from.

Implements nkExport::Exportable.

## ◆ operator=()

ConstantBuffer& nkGraphics::ConstantBuffer::operator= | ( | const ConstantBuffer & |  | ) |
| delete

Copy assignment.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/Shaders/Memory/ConstantBuffer.h